/* 全局样式 */
:root {
    --primary-color: #4a90e2;
    --secondary-color: #2c3e50;
    --text-color: #333;
    --light-gray: #f5f5f5;
    --border-color: #ddd;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

/* 头部样式 */
.header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

/* 主要内容区域 */
.main-container {
    max-width: 1200px;
    margin: 80px auto 0;
    padding: 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

/* 博客文章样式 */
.blog-post {
    background: #fff;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.blog-post h2 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.post-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.post-meta span {
    margin-right: 1rem;
}

.post-excerpt {
    margin-bottom: 1.5rem;
}

.read-more {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.read-more:hover {
    background-color: #357abd;
}

/* 侧边栏样式 */
.sidebar {
    position: sticky;
    top: 100px;
}

.widget {
    background: #fff;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.widget h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 0.5rem;
}

.category-list a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.category-list a:hover {
    color: var(--primary-color);
}

/* 页脚样式 */
.footer {
    background-color: var(--secondary-color);
    color: #fff;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links a {
    color: #fff;
    margin-left: 1rem;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
}

/* 返回顶部按钮 */
#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: background-color 0.3s ease;
}

#back-to-top:hover {
    background-color: #357abd;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-container {
        grid-template-columns: 1fr;
    }

    .nav-container {
        flex-direction: column;
        text-align: center;
    }

    .nav-links {
        margin-top: 1rem;
    }

    .nav-links li {
        margin: 0 1rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .social-links {
        margin-top: 1rem;
    }

    .social-links a {
        margin: 0 0.5rem;
    }
} 